﻿// <copyright file="IQueueProvider.cs" company="Ecole Normale Supérieure">
// Released under GPLv2
// </copyright>
// <summary>Contains queue provider interfac.</summary>

namespace Sqwarea.Persistence
{
    /// <summary>
    /// This interface provides interface to "NewKingsId" and "ConnexityBreakPoint" queue.
    /// </summary>
    public interface IQueueProvider
    {
        /// <summary>
        /// Gets the length of the "NewKingsId" queue.
        /// </summary>
        /// <returns>See summary.</returns>
        int GetNewKingsIdQueueLength();

        /// <summary>
        /// Gets the length of the "ConnexityKingToCorrect" queue.
        /// </summary>
        /// <returns>See summary.</returns>
        int GetConnexityKingQueueLength();

        /// <summary>
        /// Gets the length of the "CleanableKingId" queue.
        /// </summary>
        /// <returns>See summary.</returns>
        int GetCleanableKingIdQueueLength();

        /// <summary>
        /// Puts id from start to start+count-1 in "NewKinsId" queue.
        /// </summary>
        /// <param name="start">First id to put in the queue</param>
        /// <param name="count">Number of ids to put in the queue</param>
        void PutNewKingsId(long start, long count);

        /// <summary>
        /// Puts a ConnexityBreakPoint in the "ConnexityBreakPoint" queue.
        /// </summary>
        /// <param name="connexityBreakPoint">The ConnexityBreakPoint</param>
        void PutConnexityBreakPoint(ConnexityBreakpoint connexityBreakPoint);
        
        /// <summary>
        /// Puts a king Id in the "ConnexityKingToCorrect" queue.
        /// </summary>
        /// <param name="kingId">The Id of the King</param>
        void PutConnexityKingToCorrect(long kingId);

        /// <summary>
        /// Adds a King to the list of king that must get their temporary attacks table cleaned
        /// </summary>
        /// <param name="kingId">Id of the king.</param>
        void PutKingToClean(long kingId);
    }
}
